package CBD;
// Generated 29/07/2014 07:17:07 PM by Hibernate Tools 3.6.0


import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Detalleventa generated by hbm2java
 */
@Entity
@Table(name="detalleventa"
    ,catalog="saler"
)
public class Detalleventa  implements java.io.Serializable {


     private Integer idDetalleVenta;
     private Stock stock;
     private Combo combo;
     private Producto producto;
     private Contacto contacto;
     private Venta venta;
     private Date fecha;

    public Detalleventa() {
    }

    public Detalleventa(Stock stock, Combo combo, Producto producto, Contacto contacto, Venta venta, Date fecha) {
       this.stock = stock;
       this.combo = combo;
       this.producto = producto;
       this.contacto = contacto;
       this.venta = venta;
       this.fecha = fecha;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)

    
    @Column(name="idDetalleVenta", unique=true, nullable=false)
    public Integer getIdDetalleVenta() {
        return this.idDetalleVenta;
    }
    
    public void setIdDetalleVenta(Integer idDetalleVenta) {
        this.idDetalleVenta = idDetalleVenta;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="idAlmacen", nullable=false)
    public Stock getStock() {
        return this.stock;
    }
    
    public void setStock(Stock stock) {
        this.stock = stock;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="idCombinacion", nullable=false)
    public Combo getCombo() {
        return this.combo;
    }
    
    public void setCombo(Combo combo) {
        this.combo = combo;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="idIndividual", nullable=false)
    public Producto getProducto() {
        return this.producto;
    }
    
    public void setProducto(Producto producto) {
        this.producto = producto;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="idCliente", nullable=false)
    public Contacto getContacto() {
        return this.contacto;
    }
    
    public void setContacto(Contacto contacto) {
        this.contacto = contacto;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="idFactura", nullable=false)
    public Venta getVenta() {
        return this.venta;
    }
    
    public void setVenta(Venta venta) {
        this.venta = venta;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="fecha", nullable=false, length=19)
    public Date getFecha() {
        return this.fecha;
    }
    
    public void setFecha(Date fecha) {
        this.fecha = fecha;
    }




}


